<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.11"/>
<title>Icarous: /home/research133/Software/Icarous2/cFS/apps/port_lib/fsw/public_inc/port_lib.h File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { init_search(); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">Icarous
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.11 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>File&#160;Members</span></a></li>
    </ul>
  </div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_c1698e121239b1aba7f6e782e4514e49.html">cFS</a></li><li class="navelem"><a class="el" href="dir_7ee4ce95da95d11e80a01c5101ed8d14.html">apps</a></li><li class="navelem"><a class="el" href="dir_414860549fe1f5475bcb32699266eda6.html">port_lib</a></li><li class="navelem"><a class="el" href="dir_96eb22f570806912b0c00e39297e594c.html">fsw</a></li><li class="navelem"><a class="el" href="dir_177fe1f9cf5443c270b5fea5afe4fbfe.html">public_inc</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#nested-classes">Classes</a> &#124;
<a href="#define-members">Macros</a> &#124;
<a href="#enum-members">Enumerations</a> &#124;
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">port_lib.h File Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>serial/socket port library  
<a href="#details">More...</a></p>
<div class="textblock"><code>#include &quot;cfe.h&quot;</code><br />
<code>#include &lt;string.h&gt;</code><br />
<code>#include &lt;errno.h&gt;</code><br />
<code>#include &lt;unistd.h&gt;</code><br />
<code>#include &lt;stdbool.h&gt;</code><br />
<code>#include &lt;fcntl.h&gt;</code><br />
<code>#include &lt;termios.h&gt;</code><br />
<code>#include &quot;network_includes.h&quot;</code><br />
<code>#include &quot;<a class="el" href="ardupilotmega_2mavlink_8h_source.html">mavlink/ardupilotmega/mavlink.h</a>&quot;</code><br />
</div><div class="textblock"><div class="dynheader">
Include dependency graph for port_lib.h:</div>
<div class="dyncontent">
<div class="center"><img src="port__lib_8h__incl.png" border="0" usemap="#_2home_2research133_2Software_2Icarous2_2cFS_2apps_2port__lib_2fsw_2public__inc_2port__lib_8h" alt=""/></div>
<map name="_2home_2research133_2Software_2Icarous2_2cFS_2apps_2port__lib_2fsw_2public__inc_2port__lib_8h" id="_2home_2research133_2Software_2Icarous2_2cFS_2apps_2port__lib_2fsw_2public__inc_2port__lib_8h">
<area shape="rect" id="node10" href="ardupilotmega_2mavlink_8h.html" title="MAVLink comm protocol built from ardupilotmega.xml. " alt="" coords="1980,109,2132,151"/>
<area shape="rect" id="node11" href="ardupilotmega_2version_8h.html" title="MAVLink comm protocol built from ardupilotmega.xml. " alt="" coords="2019,199,2093,225"/>
<area shape="rect" id="node12" href="ardupilotmega_8h.html" title="MAVLink comm protocol generated from ardupilotmega.xml. " alt="" coords="3347,199,3461,225"/>
<area shape="rect" id="node13" href="protocol_8h_source.html" title="../protocol.h" alt="" coords="131,281,221,307"/>
<area shape="rect" id="node14" href="mavlink__msg__sensor__offsets_8h_source.html" title="./mavlink_msg_sensor\l_offsets.h" alt="" coords="246,273,399,315"/>
<area shape="rect" id="node15" href="mavlink__msg__set__mag__offsets_8h_source.html" title="./mavlink_msg_set_mag\l_offsets.h" alt="" coords="423,273,587,315"/>
<area shape="rect" id="node16" href="mavlink__msg__meminfo_8h_source.html" title="./mavlink_msg_meminfo.h" alt="" coords="611,281,786,307"/>
<area shape="rect" id="node17" href="mavlink__msg__ap__adc_8h_source.html" title="./mavlink_msg_ap_adc.h" alt="" coords="810,281,977,307"/>
<area shape="rect" id="node18" href="mavlink__msg__digicam__configure_8h_source.html" title="./mavlink_msg_digicam\l_configure.h" alt="" coords="1001,273,1159,315"/>
<area shape="rect" id="node19" href="mavlink__msg__digicam__control_8h_source.html" title="./mavlink_msg_digicam\l_control.h" alt="" coords="1183,273,1342,315"/>
<area shape="rect" id="node20" href="mavlink__msg__mount__configure_8h_source.html" title="./mavlink_msg_mount\l_configure.h" alt="" coords="1366,273,1517,315"/>
<area shape="rect" id="node21" href="mavlink__msg__mount__control_8h_source.html" title="./mavlink_msg_mount\l_control.h" alt="" coords="1541,273,1691,315"/>
<area shape="rect" id="node22" href="mavlink__msg__mount__status_8h_source.html" title="./mavlink_msg_mount\l_status.h" alt="" coords="1715,273,1866,315"/>
<area shape="rect" id="node23" href="mavlink__msg__fence__point_8h_source.html" title="./mavlink_msg_fence\l_point.h" alt="" coords="1891,273,2037,315"/>
<area shape="rect" id="node24" href="mavlink__msg__fence__fetch__point_8h_source.html" title="./mavlink_msg_fence\l_fetch_point.h" alt="" coords="2061,273,2208,315"/>
<area shape="rect" id="node25" href="mavlink__msg__fence__status_8h_source.html" title="./mavlink_msg_fence\l_status.h" alt="" coords="2232,273,2379,315"/>
<area shape="rect" id="node26" href="mavlink__msg__ahrs_8h_source.html" title="./mavlink_msg_ahrs.h" alt="" coords="2403,281,2554,307"/>
<area shape="rect" id="node27" href="mavlink__msg__simstate_8h_source.html" title="./mavlink_msg_simstate.h" alt="" coords="2578,281,2753,307"/>
<area shape="rect" id="node28" href="mavlink__msg__hwstatus_8h_source.html" title="./mavlink_msg_hwstatus.h" alt="" coords="2777,281,2956,307"/>
<area shape="rect" id="node29" href="mavlink__msg__radio_8h_source.html" title="./mavlink_msg_radio.h" alt="" coords="2981,281,3134,307"/>
<area shape="rect" id="node30" href="mavlink__msg__limits__status_8h_source.html" title="./mavlink_msg_limits\l_status.h" alt="" coords="3158,273,3303,315"/>
<area shape="rect" id="node31" href="mavlink__msg__wind_8h_source.html" title="./mavlink_msg_wind.h" alt="" coords="3328,281,3480,307"/>
<area shape="rect" id="node32" href="mavlink__msg__data16_8h_source.html" title="./mavlink_msg_data16.h" alt="" coords="3505,281,3669,307"/>
<area shape="rect" id="node33" href="mavlink__msg__data32_8h_source.html" title="./mavlink_msg_data32.h" alt="" coords="3693,281,3857,307"/>
<area shape="rect" id="node34" href="mavlink__msg__data64_8h_source.html" title="./mavlink_msg_data64.h" alt="" coords="3881,281,4045,307"/>
<area shape="rect" id="node35" href="mavlink__msg__data96_8h_source.html" title="./mavlink_msg_data96.h" alt="" coords="4069,281,4233,307"/>
<area shape="rect" id="node36" href="mavlink__msg__rangefinder_8h_source.html" title="./mavlink_msg_rangefinder.h" alt="" coords="4257,281,4447,307"/>
<area shape="rect" id="node37" href="mavlink__msg__airspeed__autocal_8h_source.html" title="./mavlink_msg_airspeed\l_autocal.h" alt="" coords="4471,273,4633,315"/>
<area shape="rect" id="node38" href="mavlink__msg__rally__point_8h_source.html" title="./mavlink_msg_rally\l_point.h" alt="" coords="4657,273,4796,315"/>
<area shape="rect" id="node39" href="mavlink__msg__rally__fetch__point_8h_source.html" title="./mavlink_msg_rally\l_fetch_point.h" alt="" coords="4820,273,4959,315"/>
<area shape="rect" id="node40" href="mavlink__msg__compassmot__status_8h_source.html" title="./mavlink_msg_compassmot\l_status.h" alt="" coords="4983,273,5172,315"/>
<area shape="rect" id="node41" href="mavlink__msg__ahrs2_8h_source.html" title="./mavlink_msg_ahrs2.h" alt="" coords="5196,281,5353,307"/>
<area shape="rect" id="node42" href="mavlink__msg__camera__status_8h_source.html" title="./mavlink_msg_camera\l_status.h" alt="" coords="5377,273,5535,315"/>
<area shape="rect" id="node43" href="mavlink__msg__camera__feedback_8h_source.html" title="./mavlink_msg_camera\l_feedback.h" alt="" coords="5559,273,5716,315"/>
<area shape="rect" id="node44" href="mavlink__msg__battery2_8h_source.html" title="./mavlink_msg_battery2.h" alt="" coords="5741,281,5913,307"/>
<area shape="rect" id="node45" href="mavlink__msg__ahrs3_8h_source.html" title="./mavlink_msg_ahrs3.h" alt="" coords="5937,281,6095,307"/>
<area shape="rect" id="node46" href="mavlink__msg__autopilot__version__request_8h_source.html" title="./mavlink_msg_autopilot\l_version_request.h" alt="" coords="6119,273,6281,315"/>
<area shape="rect" id="node47" href="mavlink__msg__remote__log__data__block_8h_source.html" title="./mavlink_msg_remote\l_log_data_block.h" alt="" coords="6305,273,6460,315"/>
<area shape="rect" id="node48" href="mavlink__msg__remote__log__block__status_8h_source.html" title="./mavlink_msg_remote\l_log_block_status.h" alt="" coords="6484,273,6639,315"/>
<area shape="rect" id="node49" href="mavlink__msg__led__control_8h_source.html" title="./mavlink_msg_led_control.h" alt="" coords="6663,281,6851,307"/>
<area shape="rect" id="node50" href="mavlink__msg__mag__cal__progress_8h_source.html" title="./mavlink_msg_mag_cal\l_progress.h" alt="" coords="6876,273,7039,315"/>
</map>
</div>
</div><div class="textblock"><div class="dynheader">
This graph shows which files directly or indirectly include this file:</div>
<div class="dyncontent">
<div class="center"><img src="port__lib_8h__dep__incl.png" border="0" usemap="#_2home_2research133_2Software_2Icarous2_2cFS_2apps_2port__lib_2fsw_2public__inc_2port__lib_8hdep" alt=""/></div>
<map name="_2home_2research133_2Software_2Icarous2_2cFS_2apps_2port__lib_2fsw_2public__inc_2port__lib_8hdep" id="_2home_2research133_2Software_2Icarous2_2cFS_2apps_2port__lib_2fsw_2public__inc_2port__lib_8hdep">
<area shape="rect" id="node2" href="apInterface_8h.html" title="function declarations, definitions of macros, datastructures and global variables for the apInterface..." alt="" coords="5,109,211,165"/>
<area shape="rect" id="node4" href="apInterface__table_8h_source.html" title="/home/research133/Software\l/Icarous2/cFS/apps/apInterface\l/fsw/src/apInterface_table.h" alt="" coords="235,109,440,165"/>
<area shape="rect" id="node5" href="ardupilot_8h.html" title="function declarations, definitions of macros, datastructures and global variables for the arudpilot a..." alt="" coords="464,109,653,165"/>
<area shape="rect" id="node7" href="ardupilot__table_8h.html" title="Ardupilot app table definition. " alt="" coords="677,109,867,165"/>
<area shape="rect" id="node8" href="gsInterface_8h.html" title="function declarations, definitions of macros, datastructures and global variables for the ground stat..." alt="" coords="915,109,1120,165"/>
<area shape="rect" id="node3" href="apInterface_8c.html" title="function definitions for apInterface app " alt="" coords="5,213,211,269"/>
<area shape="rect" id="node6" href="ardupilot_8c.html" title="function definitions for ardupilot app " alt="" coords="464,213,653,269"/>
<area shape="rect" id="node9" href="gsInterface__table_8h_source.html" title="/home/research133/Software\l/Icarous2/cFS/apps/gsInterface\l/fsw/src/gsInterface_table.h" alt="" coords="915,213,1120,269"/>
</map>
</div>
</div>
<p><a href="port__lib_8h_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
Classes</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structport__t.html">port_t</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">Structure to hold port attributes.  <a href="structport__t.html#details">More...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a>
Macros</h2></td></tr>
<tr class="memitem:af7b7dc9a200cb1404c280bd500fd1551"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="af7b7dc9a200cb1404c280bd500fd1551"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="port__lib_8h.html#af7b7dc9a200cb1404c280bd500fd1551">BUFFER_LENGTH</a>&#160;&#160;&#160;1000</td></tr>
<tr class="memdesc:af7b7dc9a200cb1404c280bd500fd1551"><td class="mdescLeft">&#160;</td><td class="mdescRight">Mavlink message receive buffer size. <br /></td></tr>
<tr class="separator:af7b7dc9a200cb1404c280bd500fd1551"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="enum-members"></a>
Enumerations</h2></td></tr>
<tr class="memitem:a66e863beb9373e5375cccc1270fcdb5b"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="port__lib_8h.html#a66e863beb9373e5375cccc1270fcdb5b">portType_e</a> { <a class="el" href="port__lib_8h.html#a66e863beb9373e5375cccc1270fcdb5ba0917971ba80f3b48c7d0cf1b2da024c7">SOCKET</a>, 
<a class="el" href="port__lib_8h.html#a66e863beb9373e5375cccc1270fcdb5bab110642f01505447ed49cf2d49fbf0a2">SERIAL</a>
 }</td></tr>
<tr class="separator:a66e863beb9373e5375cccc1270fcdb5b"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:ae0abbd394f152240173d8886a8028c89"><td class="memItemLeft" align="right" valign="top">int32&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="port__lib_8h.html#ae0abbd394f152240173d8886a8028c89">Port_LibInit</a> (void)</td></tr>
<tr class="separator:ae0abbd394f152240173d8886a8028c89"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae7c17d1fe2b349e540cd5da2d2d9b099"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="port__lib_8h.html#ae7c17d1fe2b349e540cd5da2d2d9b099">InitializeSocketPort</a> (<a class="el" href="structport__t.html">port_t</a> *prt)</td></tr>
<tr class="separator:ae7c17d1fe2b349e540cd5da2d2d9b099"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2f8c16fefbc1455d663261965f212f9e"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="port__lib_8h.html#a2f8c16fefbc1455d663261965f212f9e">InitializeSerialPort</a> (<a class="el" href="structport__t.html">port_t</a> *prt, bool should_block)</td></tr>
<tr class="separator:a2f8c16fefbc1455d663261965f212f9e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afb6fc10453a780fd7a17b91468316ddc"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="port__lib_8h.html#afb6fc10453a780fd7a17b91468316ddc">writeMavlinkData</a> (<a class="el" href="structport__t.html">port_t</a> *prt, mavlink_message_t *message)</td></tr>
<tr class="separator:afb6fc10453a780fd7a17b91468316ddc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a03f2dc5b2f5b2d574266abb4d5bc0f00"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="port__lib_8h.html#a03f2dc5b2f5b2d574266abb4d5bc0f00">readPort</a> (<a class="el" href="structport__t.html">port_t</a> *prt)</td></tr>
<tr class="separator:a03f2dc5b2f5b2d574266abb4d5bc0f00"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5422fa17fc6bf125dc315c24ee0fbaab"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="port__lib_8h.html#a5422fa17fc6bf125dc315c24ee0fbaab">writeData</a> (<a class="el" href="structport__t.html">port_t</a> *prt, char *sendbuffer, int datalength)</td></tr>
<tr class="separator:a5422fa17fc6bf125dc315c24ee0fbaab"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>serial/socket port library </p>
</div><h2 class="groupheader">Enumeration Type Documentation</h2>
<a class="anchor" id="a66e863beb9373e5375cccc1270fcdb5b"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="port__lib_8h.html#a66e863beb9373e5375cccc1270fcdb5b">portType_e</a></td>
        </tr>
      </table>
</div><div class="memdoc">
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a class="anchor" id="a66e863beb9373e5375cccc1270fcdb5ba0917971ba80f3b48c7d0cf1b2da024c7"></a>SOCKET&#160;</td><td class="fielddoc">
<p>enum value SOCKET </p>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="a66e863beb9373e5375cccc1270fcdb5bab110642f01505447ed49cf2d49fbf0a2"></a>SERIAL&#160;</td><td class="fielddoc">
<p>enum value SERIAL </p>
</td></tr>
</table>

</div>
</div>
<h2 class="groupheader">Function Documentation</h2>
<a class="anchor" id="a2f8c16fefbc1455d663261965f212f9e"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int InitializeSerialPort </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structport__t.html">port_t</a> *&#160;</td>
          <td class="paramname"><em>prt</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>should_block</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Initialize a serial port </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">*prt</td><td>pointer to port </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ae7c17d1fe2b349e540cd5da2d2d9b099"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void InitializeSocketPort </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structport__t.html">port_t</a> *&#160;</td>
          <td class="paramname"><em>prt</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Initialize a socket port </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">*prt</td><td>pointer to port </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ae0abbd394f152240173d8886a8028c89"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int32 Port_LibInit </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Initialize port library </p><dl class="section return"><dt>Returns</dt><dd></dd></dl>

</div>
</div>
<a class="anchor" id="a03f2dc5b2f5b2d574266abb4d5bc0f00"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int readPort </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structport__t.html">port_t</a> *&#160;</td>
          <td class="paramname"><em>prt</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Read raw data from port </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">prt</td><td>pointer to port to read from </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a5422fa17fc6bf125dc315c24ee0fbaab"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void writeData </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structport__t.html">port_t</a> *&#160;</td>
          <td class="paramname"><em>prt</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">char *&#160;</td>
          <td class="paramname"><em>sendbuffer</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>datalength</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Write raw data to port </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">prt</td><td>pointer to port to read data from </td></tr>
    <tr><td class="paramname">sendbuffer</td><td>pointer to char array contiaining data </td></tr>
    <tr><td class="paramname">datalength</td><td>length of data to be used </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="afb6fc10453a780fd7a17b91468316ddc"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void writeMavlinkData </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structport__t.html">port_t</a> *&#160;</td>
          <td class="paramname"><em>prt</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">mavlink_message_t *&#160;</td>
          <td class="paramname"><em>message</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Write mavlink message to a given port </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">*prt</td><td>pointer to output port </td></tr>
    <tr><td class="paramname">*message</td><td>pointer to mavlink message </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.11
</small></address>
</body>
</html>
